const getRequest = (url: string) => {
  const urlArr = url.split('?')
  const searchStr = urlArr[1]
  const theRequest = {}
  if (searchStr) {
    const strArr = searchStr.split('&')
    for (let i = 0; i < strArr.length; i++) {
      const paraArr = strArr[i].split('=')
      //@ts-ignore
      theRequest[paraArr[0]] = window.decodeURIComponent(paraArr[1])
    }
  }
  return theRequest
}
export default getRequest
